package com.tinyseed.emcp.api.maintenance.domain;

import com.tinyseed.emcp.api.basicdata.domain.Enterprise;
import com.tinyseed.emcp.api.basicdata.domain.Monitor;
import lombok.*;

import javax.persistence.*;
import java.io.Serializable;

/**
 * @version Revision 1.0.0
 * @版权：
 * @author: Howard
 * @email:
 * @see:
 * @创建日期：2020/3/14
 * @功能说明：维保信息
 * @begin
 * @修改记录:
 * @修改后版本 修改人        修改内容
 * @2020/3/14 wuxiran        创建
 * @end
 */
@Entity()
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Data
@Table(name = "tb_maintenance_equipment_info")
public class MaintenanceEquipmentInfo implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "maintenance_equipment_info")
    @SequenceGenerator(sequenceName = "maintenance_equipment_info_sequence", name = "maintenance_equipment_info", allocationSize = 1)
    @Column(name = "id")
    private Long id;

    @ManyToOne
    @JoinColumn(name = "enterprise_id")
    private Enterprise enterprise;

    /**
     * 监测点id
     */
    @OneToOne
    @JoinColumn(name = "monitor_id")
    private Monitor monitor;

    /**
     * 设备情况
     */
    @Column()
    private String equipmentCondition;

    /**
     * 备注
     */
    @Column()
    private Long remark;

}
